/* 
 * File:   QCamera.h
 * Author: matt
 *
 * Created on 16 May 2010, 19:07
 */

#ifndef _QCAMERA_H
#define	_QCAMERA_H
#include <cv.h>
#include <cvaux.h>
#include <highgui.h>
#include <iostream>
#include <QObject>
#include <QImage>
#include <QColor>

using namespace cv;
using namespace std;

class QCamera : public QObject {
    Q_OBJECT
public:
    QCamera();
    QCamera(int camera_number);
    virtual ~QCamera();

public slots:
    void getImage();

signals:
    void newImage(QImage image);

private:
    bool working;
    VideoCapture capture;
    Mat cv_frame;
    QImage frame;
};

#endif	/* _QCAMERA_H */

